/******************************************************************************
 * Copyright (C) 2021 Batonova
 * All rights reserved.
 *****************************************************************************/

/**
 * @file dra/core/typedefine.h
 * @brief Define basic data type.
 *
 * Rename data type for integer and string etc by data length(Bytes).
 *
 * @author batonova
 * @date 25 June 2021
 */

#ifndef DRA_CORE_TYPEDEFINE_H_
#define DRA_CORE_TYPEDEFINE_H_

#include <stdint.h>
#include <iostream>
#ifndef DATAID_INVALID_VALUE
#define DATAID_INVALID_VALUE 0x00
#endif

// SWS_CM_00504 19-11
// namespace deviceware {
// namespace base {

    /** @addtogroup base
     * @brief type define of deviceware.base
     *
     * @{
     */

    /**
     * @brief A common type define for BOOLEAN.
     *
     * bool type define.
     */
    using BOOLEAN  = bool;

    /**
     * @brief A common type define for UINT8.
     *
     * 8 bits unsigned integer type define.
     */
    using UINT8 = unsigned char;

    /**
     * @brief A common type define for UINT16.
     *
     * 16 bits unsigned integer type define.
     */
    using UINT16 = unsigned short;  // NOLINT

    /**
     * @brief A common type define for UINT32.
     *
     * 32 bits unsigned integer type define.
     */
    using UINT32 = unsigned  int;

    /**
     * @brief A common type define for UINT64.
     *
     * 64 bits unsigned integer type define.
     */
    using UINT64 = uint64_t;

    /**
     * @brief A common type define for INT8.
     *
     * 8 bits integer type define.
     */
    using INT8 = signed char;

    /**
     * @brief A common type define for INT16.
     *
     * 16 bits integer type define.
     */
    using INT16 = short;   // NOLINT

    /**
     * @brief A common type define for INT32.
     *
     * 32 bits integer type define.
     */
    using INT32 = int;

    /**
     * @brief A common type define for INT64.
     *
     * 64 bits integer type define.
     */
    using INT64 = int64_t;

    /**
     * @brief A common type define for BYTE.
     *
     * 8 bits byte type define.
     */
    using BYTE = unsigned char;

    /**
     * @brief A common type define for CHAR.
     *
     * char type define.
     */
    using CHAR = char;

    /**
     * @brief A common type define for SHORT.
     *
     * short type define.
     */
    using SHORT = short;  // NOLINT

    /**
     * @brief A common type define for DOUBLE.
     *
     * 64 bits floating-point type define.
     */
    using DOUBLE = double;

    /**
     * @brief A common type define for FLOAT.
     *
     * 32 bits floating-point type define.
     */
    using FLOAT = float;

    /**
     * @brief A common type define for FLOAT32.
     *
     * 32 bits floating-point type define.
     */
    using FLOAT32 = float;

    /**
     * @brief A common type define for FLOAT64.
     *
     * 64 bits floating-point type define.
     */
    using FLOAT64 = double;

    /**
     * @brief A common type define for STRING.
     *
     * string type redefinition by std::string.
     */
    using STRING = std::string;

    /**
     * @brief A common type define for VOID.
     *
     * void type define.
     */
    using VOID = void;

    struct fd_t {      // NOLINT
        INT32 value = -1;
    };

    /** @}*/
// }  // namespace base
// }  // namespace deviceware

#endif  // DRA_CORE_TYPEDEFINE_H_
